#
# Makefile for building SystemC projects
# Author : Aleksey Golovchenko
#

# FLAGS=-fpermissive
INCLUDE=-I$(SYSTEMC23_INCLUDE) 
LIB=-L$(SYSTEMC23_LIB) -Bstatic -lsystemc -lpthread 
TARGET=tb_8b10b

all: distclean bin

bin: obj	
	g++ main.o enc8b10b.o dec8b10b.o -o $(TARGET) $(LIB) $(FLAGS)

obj:
	g++ -c main.cpp enc8b10b.cpp dec8b10b.cpp $(INCLUDE) $(FLAGS)

clean:
	rm -f *.o *.err

distclean: clean
	rm -f $(TARGET) *.vcd

view:
	-gtkwave $(TARGET).vcd

